Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
@babel/runtime
Advanced tools
The @babel/runtime package is a library that includes Babel modular runtime helpers and a version of regenerator-runtime. It is used to avoid polluting the global scope and to reduce the size of the compiled output by deduplicating helper functions that are commonly used by Babel-transpiled code. It is particularly useful when building libraries or applications that need to be optimized for size and scope isolation.
Modularized Helpers
This feature allows you to use Babel's helper functions in a modular way, without including them in every file that needs them, thus reducing redundancy and file size.
import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
class MyClass {
constructor() {
_classCallCheck(this, MyClass);
// class body
}
}
Regenerator Runtime
Includes a version of the regenerator runtime to enable the use of async/await and generator functions in environments that do not natively support them.
import 'regenerator-runtime/runtime';
async function asyncCall() {
await someAsyncFunction();
}
Similar to @babel/runtime, core-js is a modular standard library for JavaScript, which includes polyfills for ECMAScript features. It is often used in conjunction with Babel to ensure that newer language features will work in older environments. It is more comprehensive than @babel/runtime but can lead to larger bundle sizes if not used carefully.
tslib is a runtime library for TypeScript that includes helper functions similar to those in @babel/runtime. It is used to support features from TypeScript such as async/await, spread operators, and others without duplicating code. It is specific to TypeScript, whereas @babel/runtime is used with Babel and can be used with JavaScript or TypeScript.
babel's modular runtime helpers
See our website @babel/runtime for more information.
Using npm:
npm install --save @babel/runtime
or using yarn:
yarn add @babel/runtime
v7.26.0 (2024-10-25)
babel-core
, babel-generator
, babel-parser
, babel-plugin-syntax-import-assertions
, babel-plugin-syntax-import-attributes
, babel-preset-env
, babel-standalone
, babel-types
babel-core
babel-compat-data
, babel-plugin-proposal-regexp-modifiers
, babel-plugin-transform-regexp-modifiers
, babel-preset-env
, babel-standalone
babel-parser
startIndex
parser option (@DylanPiercey)babel-generator
, babel-parser
, babel-plugin-syntax-flow
babel-helpers
, babel-preset-typescript
, babel-runtime-corejs3
import()
in rewriteImportExtensions
(@liuxingbaoyu)babel-generator
, babel-parser
@babel/generator
(@nicolo-ribaudo)babel-core
babel-plugin-proposal-json-modules
, babel-plugin-transform-json-modules
, babel-standalone
proposal-json-modules
to transform-json-modules
(@nicolo-ribaudo)babel-code-frame
, babel-highlight
@babel/highlight
in @babel/code-frame
(@nicolo-ribaudo)babel-generator
, babel-parser
, babel-types
kind
to TSModuleDeclaration
(@liuxingbaoyu)babel-helper-module-transforms
, babel-plugin-transform-modules-commonjs
FAQs
babel's modular runtime helpers
The npm package @babel/runtime receives a total of 0 weekly downloads. As such, @babel/runtime popularity was classified as not popular.
We found that @babel/runtime demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.